export function isObject(value) {
  return typeof value === "object" && value !== null;
}

export function def(data, key, value) {
  Object.defineProperty(data, key, {
    enumerable: false,
    configurable: false,
    value,
  });
}
export function query(el) {
  if (typeof el === "string") {
    const selected = document.querySelector(el);
    if (!selected) {
      return document.createElement("div");
    }
    return selected;
  } else {
    return el;
  }
}
/**
 * 判断是否为对象
 * @param {*} obj 
 */
export function isPlainObject (obj) {
  return _toString.call(obj) === '[object Object]'
}
